<?php if(isset($register_success) ){ ?>
<div class="register_success">Congratulation. Your account has been created. You can Login to your account now.</div>
<?php }else{ ?>
<form method="post" action="<?php echo current_url();?>">
<div class="title">Username</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('username'))); ?></div>
<div class="input">
    <input type="text" name="username" value="<?php echo set_value('username'); ?>" />
</div>
<div class="title">Password</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('password'))); ?></div>
<div class="input">
    <input type="password" name="password" value="<?php echo set_value('',''); ?>" />
</div>
<div class="title col2">Name</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('name'))); ?></div>
<div class="input">
    <input type="text" name="name" />
</div>
<div class="title">Email</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('email'))); ?></div>
<div class="input">
    <input type="text" name="email" value="<?php echo set_value('email'); ?>" />
</div>
<div class="title">Phone</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('phone'))); ?></div>
<div class="input">
    <input type="text" name="phone" value="<?php echo set_value('phone'); ?>" />
</div>
<div class="title">Address</div><div class="errorField"><?php echo str_replace("The","",str_replace("field","",form_error('address'))); ?></div>
<div class="input">
    <textarea name="address"><?php echo set_value('address'); ?></textarea>
</div>
<div>
    <input type="submit" value="Register" name="btnregister" class="button_red" />
</div>
</form>
<?php } ?>